part of 'bloc.dart';

class GoogleAppleStorePurchasePageBlocState {
  const GoogleAppleStorePurchasePageBlocState({
    required this.monthSubscriptionModel,
    required this.yearSubscriptionModel,
    required this.lifetimePurchaseItemModel,
    required this.selectedPurchaseItemSku,
    required this.purchaseRequestInProgress,
    required this.premiumAccessActive,
  });

  final MonthSubscriptionModel monthSubscriptionModel;
  final YearSubscriptionModel yearSubscriptionModel;
  final LifetimePurchaseItemModel lifetimePurchaseItemModel;
  final String selectedPurchaseItemSku;
  final bool purchaseRequestInProgress;
  final bool premiumAccessActive;

  GoogleAppleStorePurchasePageBlocState copyWith({
    MonthSubscriptionModel Function()? monthSubscriptionModel,
    YearSubscriptionModel Function()? yearSubscriptionModel,
    LifetimePurchaseItemModel Function()? lifetimePurchaseItemModel,
    String Function()? selectedPurchaseItemSku,
    bool Function()? purchaseRequestInProgress,
    bool Function()? premiumAccessActive,
  }) {
    return GoogleAppleStorePurchasePageBlocState(
      monthSubscriptionModel:
          monthSubscriptionModel == null ? this.monthSubscriptionModel : monthSubscriptionModel(),
      yearSubscriptionModel:
          yearSubscriptionModel == null ? this.yearSubscriptionModel : yearSubscriptionModel(),
      lifetimePurchaseItemModel: lifetimePurchaseItemModel == null
          ? this.lifetimePurchaseItemModel
          : lifetimePurchaseItemModel(),
      selectedPurchaseItemSku: selectedPurchaseItemSku == null
          ? this.selectedPurchaseItemSku
          : selectedPurchaseItemSku(),
      purchaseRequestInProgress: purchaseRequestInProgress == null
          ? this.purchaseRequestInProgress
          : purchaseRequestInProgress(),
      premiumAccessActive:
          premiumAccessActive == null ? this.premiumAccessActive : premiumAccessActive(),
    );
  }
}
